package com.qf.servlet;

import com.qf.service.Test2Service;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/test2")
public class ServletDemo2 extends HttpServlet {
    private Test2Service service = new Test2Service();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        service.showUser();
        resp.getWriter().write("test222222");
    }
}
